import BaseHTTPServer, CGIHTTPServer

handler = CGIHTTPServer.CGIHTTPRequestHandler
handler.cgi_directories = ["/"] 

try :  
	server = BaseHTTPServer.HTTPServer(("localhost",2000),handler)
	server.serve_forever()
except KeyboardInterrupt:
	print 'Control+c: http serv is getting shutdown'
	server.socket.close()
	
	